<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head></h:head>
<h:body>
	<p:panel header="Pacchetto Invitato">
		<h:form>
			<h:panelGrid columns="2" id="modGrid">

				<h:outputText value="Nome Pacchetto:" />
				<h:outputText value="#{friendBean.selectedPack.nome}" />

				<h:outputText value="Luogo:" />
				<h:outputText value="#{friendBean.selectedPack.luogo}" />

				<h:outputText value="Posti disponibili:" />
				<h:outputText value="#{friendBean.selectedPack.numeroPosti}" />

				<h:outputText value="Data Partenza:" />
				<h:outputText value="#{friendBean.selectedPack.dataPartenza}" >
					<f:convertDateTime type = "date"/>
				</h:outputText>	
				
				<h:outputText value="Data Ritorno:" />
				<h:outputText value="#{friendBean.selectedPack.dataArrivo}" >
					<f:convertDateTime type = "date"/>
				</h:outputText>	


				<h:outputText value="Hotel" />
				<h:outputText
					value="#{hotelBean.getHotelId(friendBean.selectedPack.hotel).nome},
									 #{hotelBean.getHotelId(friendBean.selectedPack.hotel).prezzoSingolo} €" />


				<h:outputText value="Escursione" />
				<h:outputText
					value="#{escurBean.getResultId(friendBean.selectedPack.escursione).get(0).nome}, 
									 #{escurBean.getResultId(friendBean.selectedPack.escursione).get(0).prezzoSingolo} €" />

				<h:outputText value="Prezzo del pacchetto " />
				<h:outputText value="#{friendBean.selectedPack.prezzo} €" />


			</h:panelGrid>
			<p:commandButton value="Salva" action="#{friendBean.prenota()}"
				update="growl" />
			<p:growl id="growl" sticky="true" showDetail="true" />
		</h:form>
	</p:panel>

</h:body>
</html>